package com.zhanghe.study.spring4.beans.helloworld;

/**
 * @author zh
 * @date 2021/1/3 16:58
 */
public class HelloWorld {
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        System.out.println("set方法："+name);
        this.name = name;
    }

    public void hello(){
        System.out.println(name);
    }

    public HelloWorld(){
        System.out.println("构造器执行");
    }

    public HelloWorld(String name){
        System.out.println("构造器注入"+name);
        this.name = name;
    }
}
